//
// Created by postgres on 5/22/17.
//

#ifndef MYDATASTRUCTURES_B_TREE_H
#define MYDATASTRUCTURES_B_TREE_H
#include "../common/common.h"
#define m 5
#define KeyType char
#define Boolean char
#define KeyType_NULL '\0'
typedef struct BTNode
{
    int keynum;
    struct BTNode *parent;
    KeyType data[m+1];
    struct BTNode *child[m+1];
}BTNode,*BTree;
typedef struct Result
{
    BTNode *node; /*成功返回该结点，失败返回应该插入的结点*/
    int pos; //返回Ai-1
    int flag; /*flag=1 成功,flag=0失败 */
    int null_child_index; //空孩子位置.当情形3循环到情形2时，孩子过继插入的位置
}Result;
int BTree_Main();
#endif //MYDATASTRUCTURES_B_TREE_H
